﻿using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Runtime.CompilerServices;
using Prism.Mvvm;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.Xaml.Internals;

namespace AutoR.Views.Home
{
	// Token: 0x02000047 RID: 71
	[XamlFilePath("Views\\Home\\Quest.xaml")]
	public class Quest : ContentPage
	{
		// Token: 0x060000EC RID: 236 RVA: 0x0003C56A File Offset: 0x0003A76A
		public Quest()
		{
			this.InitializeComponent();
		}

		// Token: 0x060000ED RID: 237 RVA: 0x0003C578 File Offset: 0x0003A778
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private void InitializeComponent()
		{
			if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(Quest).GetTypeInfo().Assembly.GetName(), "Views/Home/Quest.xaml") != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			BindingExtension bindingExtension = new BindingExtension();
			DataTemplate dataTemplate = new DataTemplate();
			ListView listView = new ListView();
			NameScope value = new NameScope();
			NameScope.SetNameScope(this, value);
			this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
			this.SetValue(Page.TitleProperty, "任务");
			bindingExtension.Path = "UserTask";
			BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
			listView.SetBinding(ItemsView<Cell>.ItemsSourceProperty, binding);
			listView.SetValue(ListView.HasUnevenRowsProperty, true);
			listView.SetValue(View.VerticalOptionsProperty, LayoutOptions.FillAndExpand);
			IDataTemplate dataTemplate2 = dataTemplate;
			Quest.<InitializeComponent>_anonXamlCDataTemplate_19 <InitializeComponent>_anonXamlCDataTemplate_ = new Quest.<InitializeComponent>_anonXamlCDataTemplate_19();
			object[] array = new object[0 + 3];
			array[0] = dataTemplate;
			array[1] = listView;
			array[2] = this;
			<InitializeComponent>_anonXamlCDataTemplate_.parentValues = array;
			<InitializeComponent>_anonXamlCDataTemplate_.root = this;
			dataTemplate2.LoadTemplate = new Func<object>(<InitializeComponent>_anonXamlCDataTemplate_.LoadDataTemplate);
			listView.SetValue(ItemsView<Cell>.ItemTemplateProperty, dataTemplate);
			this.SetValue(ContentPage.ContentProperty, listView);
		}

		// Token: 0x060000EE RID: 238 RVA: 0x0003C6BF File Offset: 0x0003A8BF
		private void __InitComponentRuntime()
		{
			this.LoadFromXaml(typeof(Quest));
		}

		// Token: 0x02000048 RID: 72
		[CompilerGenerated]
		private sealed class <InitializeComponent>_anonXamlCDataTemplate_19
		{
			// Token: 0x060000F0 RID: 240 RVA: 0x0003C6E8 File Offset: 0x0003A8E8
			internal object LoadDataTemplate()
			{
				BindingExtension bindingExtension = new BindingExtension();
				Label label = new Label();
				BindingExtension bindingExtension2 = new BindingExtension();
				Label label2 = new Label();
				StackLayout stackLayout = new StackLayout();
				BindingExtension bindingExtension3 = new BindingExtension();
				Label label3 = new Label();
				StackLayout stackLayout2 = new StackLayout();
				Frame frame = new Frame();
				ViewCell viewCell = new ViewCell();
				NameScope value = new NameScope();
				NameScope.SetNameScope(viewCell, value);
				frame.SetValue(View.MarginProperty, new Thickness(2.0));
				frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(2.0));
				stackLayout2.SetValue(StackLayout.SpacingProperty, 0.0);
				stackLayout2.SetValue(VisualElement.BackgroundColorProperty, Color.LightYellow);
				stackLayout.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
				bindingExtension.Path = "type";
				BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
				label.SetBinding(Label.TextProperty, binding);
				label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				label.SetValue(Label.TextColorProperty, Color.RosyBrown);
				label.SetValue(Label.FontAttributesProperty, new FontAttributesConverter().ConvertFromInvariantString("Bold"));
				stackLayout.Children.Add(label);
				bindingExtension2.Path = "title";
				BindingBase binding2 = ((IMarkupExtension<BindingBase>)bindingExtension2).ProvideValue(null);
				label2.SetBinding(Label.TextProperty, binding2);
				label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout.Children.Add(label2);
				stackLayout2.Children.Add(stackLayout);
				bindingExtension3.Path = "desc";
				BindingBase binding3 = ((IMarkupExtension<BindingBase>)bindingExtension3).ProvideValue(null);
				label3.SetBinding(Label.TextProperty, binding3);
				label3.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
				stackLayout2.Children.Add(label3);
				frame.SetValue(ContentView.ContentProperty, stackLayout2);
				viewCell.View = frame;
				return viewCell;
			}

			// Token: 0x0400008E RID: 142
			internal object[] parentValues;

			// Token: 0x0400008F RID: 143
			internal Quest root;
		}
	}
}
